From: Keir Fraser Date: Thu, 25 Feb 2010 11:52:23 +0000 (+0000) Subject: libxc: Pre-zero argument structures for map/unmap_pirq operations. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12563 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=039950d904b0a95d1ae6238cd3c80013756adad9;p=xen.git libxc: Pre-zero argument structures for map/unmap_pirq operations. From: Yunhong Jiang Signed-off-by: Keir Fraser --- diff --git a/tools/libxc/xc_physdev.c b/tools/libxc/xc_physdev.c index 00ac829afa..dd484a1bae 100644 --- a/tools/libxc/xc_physdev.c +++ b/tools/libxc/xc_physdev.c @@ -31,6 +31,7 @@ int xc_physdev_map_pirq(int xc_handle, if ( !pirq ) return -EINVAL; + memset(&map, 0, sizeof(struct physdev_map_pirq)); map.domid = domid; map.type = MAP_PIRQ_TYPE_GSI; map.index = index; @@ -59,6 +60,7 @@ int xc_physdev_map_pirq_msi(int xc_handle, if ( !pirq ) return -EINVAL; + memset(&map, 0, sizeof(struct physdev_map_pirq)); map.domid = domid; map.type = MAP_PIRQ_TYPE_MSI; map.index = index; @@ -83,6 +85,7 @@ int xc_physdev_unmap_pirq(int xc_handle, int rc; struct physdev_unmap_pirq unmap; + memset(&unmap, 0, sizeof(struct physdev_unmap_pirq)); unmap.domid = domid; unmap.pirq = pirq;